import { defineStore } from "pinia";
import {DateItem, Doctor, hyType, IMzpbKs, IMzpbZs, IMzZq, IUser} from "@/api/typing";
interface Izc {
    zq:IMzZq | null;
    ks:IMzpbKs | null;
    zs:IMzpbZs | null;
    date:DateItem | null;
    doctor:Doctor | null;
    hy:hyType | null;
}
// 定义面包屑存储（命名规范：useXxxStore）
export const ghStore = defineStore("yvyue", {
    state:  (): Izc => ({
        zq: null,
        ks: null,
        zs: null,
        date: null,
        doctor: null,
        hy: null,
    }),
    actions: {
        setZq(zq: IMzZq) {
            this.zq = null;
            this.zq = zq
        },
        setKs(ks: IMzpbKs) {
            this.ks = null;
            this.ks = ks
        },
        setZs(zs: IMzpbZs) {
            this.zs = null;
            this.zs = zs
        },
        setSelectDate(date: DateItem) {
            this.date = null;
            this.date = date
        },
        setSelectDoctor(doctor: Doctor) {
            this.doctor = null;
            this.doctor = doctor
        },
        setHy(hy: hyType) {
            this.hy = null;
            this.hy = hy
        },
    }
});
